import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 徐海涛
 * Date: 2022-04-17
 * Time: 18:59
 */
public class Demo2 {
    //HJ37 统计每个月兔子的总数 知识点:斐波那契
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(func(n));
    }
    //构造 斐波那契 方法
    public static int func1(int nums){
        int A = 1;
        int B = 1;
        int sum = 0;
        //i 从  3 开始
        for (int i = 3; i <= nums ; i++) {
            sum = A + B;
            A = B;
            B = sum;
        }
        return sum;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = func(n);
        System.out.println(n);
    }
    public static int func(int n) {
        int[][] arr = new int[n+1][2*n];//设一个二维数组,n+1代表行 2*n代表列
        arr[1][1] = 1;//指定第一行第一列为1
        for (int i = 2; i <=n ; i++) {
            arr[i][1] = 1;//每一行每一列都为1
            // 构建杨辉三角
            for (int j = 2; j <= 2*n-1 ; j++) {
                arr[i][j] = arr[i-1][j] + arr[i-1][j-1] + arr[i-1][j-2];
            }
        }
        //判断第几个数是偶数
        for (int i = 2; i <=n ; i++) {//因为图形是对称的,所以这里 i的取值范围到 n即可
            if(arr[n][i] % 2 ==0) {
                return i;
            }
        }
        return -1;

    }
}
